/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package util;
import java.io.*;
import javax.microedition.media.*;

/**
 *
 * @author Kealan
 */
public class Sound {
      //boolean mute = false;
     // if(!mute){

   public void playSound(String name){

            InputStream stream = getClass().getResourceAsStream("Audio/"+name+".wav");
        try {
            Player p = Manager.createPlayer(stream, "audio/X-wav");
            p.realize();
            p.prefetch();
            p.start();
        }
        catch(IOException ioe){}
       catch(MediaException me){} 
    }
}
